package com.yinhe.system.service.impl;

import java.util.List;
import com.yinhe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yinhe.system.mapper.YhPartyMembersMapper;
import com.yinhe.system.domain.YhPartyMembers;
import com.yinhe.system.service.IYhPartyMembersService;

/**
 * YH_PARTY_MEMBERSService业务层处理
 * 
 * @author yinhe
 * @date 2022-09-24
 */
@Service
public class YhPartyMembersServiceImpl implements IYhPartyMembersService 
{
    @Autowired
    private YhPartyMembersMapper yhPartyMembersMapper;

    /**
     * 查询YH_PARTY_MEMBERS
     * 
     * @param id YH_PARTY_MEMBERS主键
     * @return YH_PARTY_MEMBERS
     */
    @Override
    public YhPartyMembers selectYhPartyMembersById(Long id)
    {
        return yhPartyMembersMapper.selectYhPartyMembersById(id);
    }

    /**
     * 查询YH_PARTY_MEMBERS列表
     * 
     * @param yhPartyMembers YH_PARTY_MEMBERS
     * @return YH_PARTY_MEMBERS
     */
    @Override
    public List<YhPartyMembers> selectYhPartyMembersList(YhPartyMembers yhPartyMembers)
    {
        return yhPartyMembersMapper.selectYhPartyMembersList(yhPartyMembers);
    }

    /**
     * 新增YH_PARTY_MEMBERS
     * 
     * @param yhPartyMembers YH_PARTY_MEMBERS
     * @return 结果
     */
    @Override
    public int insertYhPartyMembers(YhPartyMembers yhPartyMembers)
    {
        yhPartyMembers.setCreateTime(DateUtils.getNowDate());
        return yhPartyMembersMapper.insertYhPartyMembers(yhPartyMembers);
    }

    /**
     * 修改YH_PARTY_MEMBERS
     * 
     * @param yhPartyMembers YH_PARTY_MEMBERS
     * @return 结果
     */
    @Override
    public int updateYhPartyMembers(YhPartyMembers yhPartyMembers)
    {
        yhPartyMembers.setUpdateTime(DateUtils.getNowDate());
        return yhPartyMembersMapper.updateYhPartyMembers(yhPartyMembers);
    }

    /**
     * 批量删除YH_PARTY_MEMBERS
     * 
     * @param ids 需要删除的YH_PARTY_MEMBERS主键
     * @return 结果
     */
    @Override
    public int deleteYhPartyMembersByIds(Long[] ids)
    {
        return yhPartyMembersMapper.deleteYhPartyMembersByIds(ids);
    }

    /**
     * 删除YH_PARTY_MEMBERS信息
     * 
     * @param id YH_PARTY_MEMBERS主键
     * @return 结果
     */
    @Override
    public int deleteYhPartyMembersById(Long id)
    {
        return yhPartyMembersMapper.deleteYhPartyMembersById(id);
    }
}
